/*******************************************************************************
 ** 
 ** This file is part of cmemtrac
 ** (C) 2011 Kevin Druelle 
 **
 ** Cmemtrac is free software: you can redistribute it and/or modify
 ** it under the terms of the GNU Lesser General Public License as published by
 ** the Free Software Foundation, either version 3 of the License, or
 ** (at your option) any later version.
 ** 
 ** Cmemtrac is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
 ** 
 ** You should have received a copy of the GNU General Public License
 ** along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 ** 
 ******************************************************************************/

#ifndef __C_STACK_H__
#define __C_STACK_H__


#include <stdlib.h>

typedef struct cstack_st                  *cstack_t;

#ifdef __cplusplus
extern "C" {
#endif

int cstack_init(cstack_t * stack);

// Capacity
/**
* @brief Test whether container is empty
* @return 0 if not, positive if container is empty, negative value if container is not initialized.
*/
int cstack_isEmpty(cstack_t * stack);
size_t cstack_getSize(cstack_t * stack);

void * cstack_top(cstack_t * stack);
int cstack_push(cstack_t * stack, void * pData);
void * cstack_pop(cstack_t * stack);

void cstack_delete(cstack_t * stack);

#ifdef __cplusplus
} // extern "C"
#endif

#endif // __C_STACK_H__
